d93ac132cc1f54e9a25a233d5ab25a247ec26be6,src/main/java/water/fvec/createInteractions.java,createInteractions,compute2,#,105
Before Change
public void compute2() {
// base frame - same as source
DKV.remove(Key.make(_ci.target));//shouldn't be needed, but this avoids missing chunk issues
_out = new Frame(Key.make(_ci.target), _ci.source.names().clone(), _ci.source.vecs().clone());
_out.delete_and_lock(_job);
int idx1 = _ci.factors[0];
After Change
}
// Log.info("Combining columns " + idx1 + " and " + idx2);
final Vec A = i > 1 ? _out.vecs()[idx1] : _ci.source.vecs()[idx1];
final Vec B = _ci.source.vecs()[idx2];
// Pass 1: compute unique domains of all interaction features
createInteractionDomain pass1 = new createInteractionDomain(idx1 == idx2).doAll(A, B);
// Create a new Vec based on the domain
final Vec vec = _ci.source.anyVec().makeZero(makeDomain(pass1._unsortedMap, A.domain(), B.domain()));
if (i > 1) {
_out.add(name, vec);
_out.update(_job);
} else {
_out = new Frame(Key.make(_ci.target), new String[]{name}, new Vec[]{vec});
_out.delete_and_lock(_job);
}
final Vec C = _out.lastVec();